from django.db import models
import django.utils.timezone as timezone

# Create your models here.

class Test(models.Model):
    """
    测试模型
    """
    id = models.AutoField(primary_key=True)
    name = models.CharField(verbose_name="名称",blank=True, max_length=64)
    enabled = models.BooleanField(verbose_name="是否启用", default=False)
    sex = models.IntegerField(verbose_name="性别", choices=((0, "女"), (1, "男")),
                               blank=True)
    # create_time = models.DateTimeField(auto_created=True)
    create_time = models.DateTimeField(default=timezone.now)
    update_time = models.DateTimeField(auto_now=True)

    class Meta:
        db_table = 'db_test'
        verbose_name = '测试信息'
        verbose_name_plural = verbose_name
